package com.winning.joiner.magiccube.tool.config;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.support.PropertiesLoaderUtils;

public class MappingConfig {
	
	private static final Logger LOG=LoggerFactory.getLogger(MappingConfig.class);
	public static Map<String,String> classNameMap=new HashMap<>();
	
	static {
		try {
			Properties loadAllProperties = PropertiesLoaderUtils.loadAllProperties("table2Java.properties");
			for (String key : loadAllProperties.stringPropertyNames()) {
				classNameMap.put(key, loadAllProperties.getProperty(key));
			}
		} catch (IOException e) {
			LOG.error("读取配置文件出错！");
		}
		
	}
	
	public static void main(String[] args) {
		System.out.println(classNameMap);
	}
}
